package com.insyte.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Khai on 7/2/2015.
 */
public class CategoryList implements Parcelable {
    private String id;
    private String name;

    public CategoryList() {

    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    // For parcelable

    public CategoryList(Parcel parcel) {
        id = parcel.readString();
        name = parcel.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(id);
        parcel.writeString(name);
    }

    public static final Creator<CategoryList> CREATOR = new Creator<CategoryList>() {
        @Override
        public CategoryList createFromParcel(Parcel parcel) {
            return new CategoryList(parcel);
        }

        @Override
        public CategoryList[] newArray(int i) {
            return new CategoryList[i];
        }
    };
}
